package com.xgy.backend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName level0_kifu
 */
@TableName(value ="level0_kifu")
@Data
public class Level0Kifu implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer kid;

    /**
     *  棋谱长度
     */
    private Integer kifuLength;

    /**
     *  棋谱手顺
     */
    private String sgfMoves;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Level0Kifu other = (Level0Kifu) that;
        return (this.getKid() == null ? other.getKid() == null : this.getKid().equals(other.getKid()))
            && (this.getKifuLength() == null ? other.getKifuLength() == null : this.getKifuLength().equals(other.getKifuLength()))
            && (this.getSgfMoves() == null ? other.getSgfMoves() == null : this.getSgfMoves().equals(other.getSgfMoves()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getKid() == null) ? 0 : getKid().hashCode());
        result = prime * result + ((getKifuLength() == null) ? 0 : getKifuLength().hashCode());
        result = prime * result + ((getSgfMoves() == null) ? 0 : getSgfMoves().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", kid=").append(kid);
        sb.append(", kifuLength=").append(kifuLength);
        sb.append(", sgfMoves=").append(sgfMoves);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}